<div class="ibox-title" th:fragment=header(title)>
    <h5 th:text="${title}" class="header-title" style="float: none;"></h5>
    <div class="ibox-tools">
        <a class="collapse-link" id="collapse-link" href="javascript:history.back()">
            <i class="am-icon-angle-left"></i>
            <i class="am-icon-angle-left"></i>
            回到上一页
        </a>
        <!--                <a class="collapse-link">-->
        <!--                    <i class="fa fa-chevron-up"></i>-->
        <!--                </a>-->
        <!--                <a class="dropdown-toggle" data-toggle="dropdown" href="#">-->
        <!--                    <i class="fa fa-wrench"></i>-->
        <!--                </a>-->
        <!--                <ul class="dropdown-menu dropdown-user">-->
        <!--                    <li><a href="#">选项1</a>-->
        <!--                    </li>-->
        <!--                    <li><a href="#">选项2</a>-->
        <!--                    </li>-->
        <!--                </ul>-->
        <!--                <a class="close-link">-->
        <!--                    <i class="fa fa-times"></i>-->
        <!--                </a>-->
    </div>
    <script>
        let $collapseLink = document.getElementById("collapse-link");
        let defaultHref='/'
        if (document.referrer) {
            if(document.referrer.includes(window.location.host)){
                defaultHref= 'javascript:history.back()'
            }
        }
        $collapseLink.setAttribute('href',defaultHref)
    </script>
</div>
